using UnityEditor;

namespace UFrame.MapJson
{
    /// <summary>
    /// 地图编辑的基类
    /// </summary>
    public class MapEditorBase : EditorWindow
    {
        /// <summary>
        /// 是否变更数据
        /// </summary>
        protected bool isChange = false;

        /// <summary>
        /// 子窗口对象
        /// </summary>
        private MapEditorBase subWindow = null;

        /// <summary>
        /// 初始化窗口
        /// </summary>
        virtual public void InitWindow() { }

        /// <summary>
        /// 加载数据
        /// </summary>
        virtual public void Load() { }

        /// <summary>
        /// 是否进行过变更
        /// </summary>
        /// <returns>true 变更过 false 未改变</returns>
        virtual public bool IsChange() { return isChange; }

        /// <summary>
        /// 保存数据
        /// </summary>
        virtual public void Save() { }
    }
}